home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / StringOption.java < prev    next >
Text File  |  1998-09-08  |  917b  |  42 lines

  1. package com.symantec.itools.frameworks.application.commandline;
  2.  
  3.  
  4. /**
  5.  * @author Symantec Internet Tools Division
  6.  * @version 1.0
  7.  * @since VCafe 3.0
  8.  */
  9.  
  10. public abstract class StringOption 
  11.     extends SingleOption
  12. {
  13.     protected StringOption()
  14.     {
  15.     }
  16.     
  17.     protected StringOption(String[] flags)
  18.     {
  19.         super(flags);        
  20.     }
  21.  
  22.     /**
  23.      * @param args TODO
  24.      * @param startIndex TODO
  25.      * @exception com.symantec.itools.frameworks.application.commandline.MissingArgumentsException
  26.      * @since VCafe 3.0
  27.      */
  28.     
  29.     protected String getString(String[] args, int startIndex)
  30.         throws MissingArgumentsException
  31.     {
  32.         try
  33.         {
  34.             return (args[startIndex + 1]);
  35.         }
  36.         catch(ArrayIndexOutOfBoundsException ex)
  37.         {
  38.             throw new MissingArgumentsException(args[startIndex]);
  39.         }
  40.     }
  41. }
  42.